<tr data-id="<?php echo $data->id ?>">
    <td><?php $subProducts = $data->subProduct;
        if (is_array($subProducts) && count($subProducts)) {
            $img = $subProducts[0]->getImage(100, 100);
            echo CHtml::image($img);
        } ?></td>
    <td><strong><?php echo $data->name ?></strong></td>
    <td><?php echo $data->sku ?></td>
    <td><?php echo CHtml::dropDownList(null, array(), $topCat, array('prompt' => '---Select---', 'class' => 'category-dropdown topCategory','encode'=>false)) ?></td>
    <td><?php echo CHtml::dropDownList(null, array(), array(), array('prompt' => '---Select---', 'class' => 'category-dropdown secondCategory','encode'=>false)) ?></td>
    <td style="width: 30%">
        <div id="category_holder_<?php echo $data->id ?>">
            <p>
                <?php
                $links = array();
                foreach ($data->categories as $category) {
                    $links[] = CHtml::link($category->title, '#', array(
                        'class' => 'cat-link category_' . $category->id . '_' . $data->id,
                        'rel' => 'popover',
                        'data-placement' => 'top',
                        'data-content' => '<a href="' . $category->id . '" data-id="' . $data->id . '" class="btn btn-danger unassign">Remove</a><a href="" class="btn cancel">Cancel</a>',
                        'data-original-title' => 'Unassign this category',
                    ));
                }
                echo implode(',', $links);
                ?>
            </p>
        </div>
    </td>
</tr>